package com.five.community.service.impl;

import com.five.community.bean.Housing;
import com.five.community.bean.vo.HousingVo;
import com.five.community.mapper.HousingMapper;
import com.five.community.service.HousingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class HousingServiceImpl implements HousingService {
    @Autowired
    private HousingMapper housingMapper;
    @Override
    public List<HousingVo> selectAllF() throws Exception {
        return housingMapper.selectAllF();
    }

    @Override
    public List<Housing> selectAll() throws Exception {
        return housingMapper.selectAll();
    }

    @Override
    public List<HousingVo> selectByName(String property) throws Exception {
        return housingMapper.selectByName(property);
    }

    @Override
    public void insert(Housing housing) throws Exception {
        housingMapper.insert(housing);
    }

    @Override
    public Housing selectById(long id) throws Exception {
        return housingMapper.selectById(id);
    }

    @Override
    public void update(Housing housing) throws Exception {
        housingMapper.update(housing);
    }

    @Override
    public void delete(long id) throws Exception {
        housingMapper.delete(id);
    }
}
